3.487 \(\int (e \sec (c+d x))^{-n} (a+i a \tan (c+d x))^n \, dx\)

Optimal. Leaf size=37 \[ -\frac{i (a+i a \tan (c+d x))^n (e \sec (c+d x))^{-n}}{d n} \]

[Out]

((-I)*(a + I*a*Tan[c + d*x])^n)/(d*n*(e*Sec[c + d*x])^n)

________________________________________________________________________________________

Rubi [A]  time = 0.0477303, antiderivative size = 37, normalized size of antiderivative = 1., number of steps used = 1, number of rules used = 1, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.036, Rules used = {3488} \[ -\frac{i (a+i a \tan (c+d x))^n (e \sec (c+d x))^{-n}}{d n} \]

Antiderivative was successfully verified.

[In]

Int[(a + I*a*Tan[c + d*x])^n/(e*Sec[c + d*x])^n,x]

[Out]

((-I)*(a + I*a*Tan[c + d*x])^n)/(d*n*(e*Sec[c + d*x])^n)

Rule 3488

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(d
*Sec[e + f*x])^m*(a + b*Tan[e + f*x])^n)/(a*f*m), x] /; FreeQ[{a, b, d, e, f, m, n}, x] && EqQ[a^2 + b^2, 0] &
& EqQ[Simplify[m + n], 0]

Rubi steps

\begin{align*} \int (e \sec (c+d x))^{-n} (a+i a \tan (c+d x))^n \, dx &=-\frac{i (e \sec (c+d x))^{-n} (a+i a \tan (c+d x))^n}{d n}\\ \end{align*}

Mathematica [A]  time = 0.0365944, size = 37, normalized size = 1. \[ -\frac{i (a+i a \tan (c+d x))^n (e \sec (c+d x))^{-n}}{d n} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + I*a*Tan[c + d*x])^n/(e*Sec[c + d*x])^n,x]

[Out]

((-I)*(a + I*a*Tan[c + d*x])^n)/(d*n*(e*Sec[c + d*x])^n)

________________________________________________________________________________________

Maple [C]  time = 0.387, size = 874, normalized size = 23.6 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+I*a*tan(d*x+c))^n/((e*sec(d*x+c))^n),x)

[Out]

-I/n/d*exp(-1/2*n*(I*Pi*csgn(I*a/(exp(2*I*(d*x+c))+1)*exp(2*I*(d*x+c)))^3+I*Pi*csgn(I*exp(2*I*(d*x+c)))*csgn(I
*exp(I*(d*x+c)))^2-I*Pi*csgn(I*e/(exp(2*I*(d*x+c))+1)*exp(I*(d*x+c)))^3+I*Pi*csgn(I*exp(2*I*(d*x+c)))^3+I*Pi*c
sgn(I*exp(I*(d*x+c)))*csgn(I*exp(I*(d*x+c))/(exp(2*I*(d*x+c))+1))^2-I*Pi*csgn(I*e)*csgn(I*exp(I*(d*x+c))/(exp(
2*I*(d*x+c))+1))*csgn(I*e/(exp(2*I*(d*x+c))+1)*exp(I*(d*x+c)))-I*Pi*csgn(I*exp(2*I*(d*x+c))/(exp(2*I*(d*x+c))+
1))^2*csgn(I/(exp(2*I*(d*x+c))+1))+I*Pi*csgn(I/(exp(2*I*(d*x+c))+1))*csgn(I*exp(I*(d*x+c))/(exp(2*I*(d*x+c))+1
))^2-I*Pi*csgn(I*a/(exp(2*I*(d*x+c))+1)*exp(2*I*(d*x+c)))^2*csgn(I*a)-I*Pi*csgn(I/(exp(2*I*(d*x+c))+1))*csgn(I
*exp(I*(d*x+c)))*csgn(I*exp(I*(d*x+c))/(exp(2*I*(d*x+c))+1))-2*I*Pi*csgn(I*exp(2*I*(d*x+c)))^2*csgn(I*exp(I*(d
*x+c)))-I*Pi*csgn(I*exp(I*(d*x+c))/(exp(2*I*(d*x+c))+1))^3+I*Pi*csgn(I*e)*csgn(I*e/(exp(2*I*(d*x+c))+1)*exp(I*
(d*x+c)))^2+I*Pi*csgn(I*exp(2*I*(d*x+c))/(exp(2*I*(d*x+c))+1))^3+I*Pi*csgn(I*exp(2*I*(d*x+c))/(exp(2*I*(d*x+c)
)+1))*csgn(I*a/(exp(2*I*(d*x+c))+1)*exp(2*I*(d*x+c)))*csgn(I*a)+I*Pi*csgn(I*exp(2*I*(d*x+c)))*csgn(I*exp(2*I*(
d*x+c))/(exp(2*I*(d*x+c))+1))*csgn(I/(exp(2*I*(d*x+c))+1))+I*Pi*csgn(I*exp(I*(d*x+c))/(exp(2*I*(d*x+c))+1))*cs
gn(I*e/(exp(2*I*(d*x+c))+1)*exp(I*(d*x+c)))^2-I*Pi*csgn(I*exp(2*I*(d*x+c))/(exp(2*I*(d*x+c))+1))*csgn(I*a/(exp
(2*I*(d*x+c))+1)*exp(2*I*(d*x+c)))^2-I*Pi*csgn(I*exp(2*I*(d*x+c)))*csgn(I*exp(2*I*(d*x+c))/(exp(2*I*(d*x+c))+1
))^2-2*ln(exp(I*(d*x+c)))+2*ln(e)-2*ln(a)))

________________________________________________________________________________________

Maxima [B]  time = 1.78293, size = 116, normalized size = 3.14 \begin{align*} -\frac{i \, a^{n} e^{\left (n \log \left (-\frac{2 i \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac{\sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - 1\right ) - n \log \left (-\frac{\sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - 1\right )\right )}}{d e^{n} n} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(d*x+c))^n/((e*sec(d*x+c))^n),x, algorithm="maxima")

[Out]

-I*a^n*e^(n*log(-2*I*sin(d*x + c)/(cos(d*x + c) + 1) + sin(d*x + c)^2/(cos(d*x + c) + 1)^2 - 1) - n*log(-sin(d
*x + c)^2/(cos(d*x + c) + 1)^2 - 1))/(d*e^n*n)

________________________________________________________________________________________

Fricas [A]  time = 2.19733, size = 154, normalized size = 4.16 \begin{align*} -\frac{i \, \left (\frac{2 \, a e^{\left (2 i \, d x + 2 i \, c\right )}}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}\right )^{n}}{d n \left (\frac{2 \, e e^{\left (i \, d x + i \, c\right )}}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}\right )^{n}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(d*x+c))^n/((e*sec(d*x+c))^n),x, algorithm="fricas")

[Out]

-I*(2*a*e^(2*I*d*x + 2*I*c)/(e^(2*I*d*x + 2*I*c) + 1))^n/(d*n*(2*e*e^(I*d*x + I*c)/(e^(2*I*d*x + 2*I*c) + 1))^
n)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(d*x+c))**n/((e*sec(d*x+c))**n),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (i \, a \tan \left (d x + c\right ) + a\right )}^{n}}{\left (e \sec \left (d x + c\right )\right )^{n}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(d*x+c))^n/((e*sec(d*x+c))^n),x, algorithm="giac")

[Out]

integrate((I*a*tan(d*x + c) + a)^n/(e*sec(d*x + c))^n, x)